<template>
  <el-container>
    <el-header>
      你好，{{ name }}
    </el-header>
    <el-container>
      <el-main>
        <em-card title="我的导航">
          <template slot="subtitle" />
          <h4 class="font-size-sm text-muted mb-4">最近访问</h4>
          <tags-view />
        </em-card>
      </el-main>
      <el-aside />
    </el-container>
  </el-container>
</template>

<script>
const lineChartData = {
  newVisitis: {
    expectedData: [100, 120, 161, 134, 105, 160, 165],
    actualData: [120, 82, 91, 154, 162, 140, 145]
  },
  messages: {
    expectedData: [200, 192, 120, 144, 160, 130, 140],
    actualData: [180, 160, 151, 106, 145, 150, 130]
  },
  purchases: {
    expectedData: [80, 100, 121, 104, 105, 90, 100],
    actualData: [120, 90, 100, 138, 142, 130, 130]
  },
  shoppings: {
    expectedData: [130, 140, 141, 142, 145, 150, 160],
    actualData: [120, 82, 91, 154, 162, 140, 130]
  }
}

import { mapGetters } from 'vuex'
import TagsView from '@/components/TagsView'
import logo from '@/assets/images/logo.png'
export default {
  name: 'DashboardAdmin',
  components: {
    TagsView
  },
  data() {
    return {
      video: {
        type: 'video/mp4',
        src: 'http://oss.lunengsports.com/attachments/sts/202105/19/4df2WinyCW.mp4',
        poster: 'http://oss.lunengsports.com/assets/banner-advert.jpg'
      },
      store: {
        name: '官方旗舰店',
        thumb: logo
      }
    }
  },
  computed: {
    ...mapGetters(['name', 'avatar', 'roles'])
  },
  created() {},

  methods: {
    handleSetLineChartData(type) {
      this.lineChartData = lineChartData[type]
    }
  }
}
</script>

<style lang="scss" scoped>
.container {
  display: flex;
}
.page-main {
  flex: 1;
  padding-right: 20px;
}
.page-right-side {
  flex-basis: 20%;
  max-width: 260px;
}
.page-side-card {
  &:not(:first-child) {
    margin-top: 1rem;
  }
  ::v-deep .el-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    .el-button--text {
      padding: 0;
    }
  }
  &__header {
    display: flex;
    align-items: center;
  }
  &__icon {
    width: 20px;
    height: 20px;
    background: #ff8143;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    i {
      font-size: 0.6em;
    }
  }
}

.card-stretch {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: stretch !important;
  -ms-flex-align: stretch !important;
  align-items: stretch !important;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  height: 100%;
}
</style>
